<?php
namespace app\common\model;

use think\Model;
use think\Db;

class LuntanReply extends Model
{
	protected $insert = ['create_time'];
	protected function setCreateTimeAttr()
	{
		return date('Y-m-d H:i:s');
	}

	/**
	* 获得回复列表
	* @return arr
	*/
	public function getReplyList($cid,$keyword,$page)
	{
		//条件
        $map  = [];
        $map1 = [];
        if($cid){
            $map['category_id'] = $cid;
        }
        if (!empty($keyword)) {
            $map['content'] = ['like', "%{$keyword}%"];
        }

        $list = $this->where($map)->select();
        return $list;
	}
}